<template>
	<table class="table table-bordered table-striped">
		<thead>
			<tr>
				<slot name="header"></slot>
			</tr>
		</thead>
		<tbody>
			<tr v-for="(item,index) in goodsList" : key="item.id">
				<slot name="body" :row='item' :index='index'></slot>
			</tr>
		</tbody>
	</table>
</template>

<script setup>
	const props=defineProps({
		goodsList:{
			goodsList:{
				type:Array,
				default:[],
				required:true
			}
		}
	})
</script>

<style scoped>
	th{
		text-align: center;
	}
</style>